#!/usr/bin/env python3
# -*- coding: utf-8 -*-

"""Python版Delphi IDE主入口文件"""

import sys
import os
from PyQt5.QtWidgets import QApplication
from src.core.app import DelphiLikeIDE


def main():
    """程序主函数"""
    # 设置应用程序的路径
    os.environ['QT_API'] = 'pyqt5'
    
    # 创建QApplication实例
    app = QApplication(sys.argv)
    app.setApplicationName("Python Delphi-like IDE")
    app.setApplicationVersion("0.1.0")
    
    # 创建主窗口实例
    ide = DelphiLikeIDE()
    ide.show()
    
    # 运行应用程序主循环
    sys.exit(app.exec_())


if __name__ == "__main__":
    main()